package tt.dz.appserver.service.task;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Repository;
import org.springframework.web.servlet.HandlerExceptionResolver;
import org.springframework.web.servlet.ModelAndView;

/**
 * 通用异常处理器（暂未注入）
 * @author 谢龙飞
 *
 */
@Repository
public class CommonExceptionHandler implements HandlerExceptionResolver {

	@Override
	public ModelAndView resolveException(HttpServletRequest request,
			HttpServletResponse response, Object obj, Exception e) {
		e.getCause().printStackTrace();
		return new ModelAndView("error");
	}
}
